<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="main">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMS显示</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</head>

<body>
	<div layout:fragment="content">
		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="/ordering/home">首页</a></li>
				<li><a href="#">SMS信息</a></li>
			</ul>
		</div>
		<br />
		<div class="rightinfo">
			<div class="tools">
				<form action="getSMS">
					<div class="container">
						<div class="col align-self-center">
							<div class="input-group input-group-lg">
								<div class="input-group-prepend">
									<span class="input-group-text" id="inputGroup-sizing-lg">手机号</span>
								</div>
								<input type="text" name="mobile" th:value="${sms.mobile}"
									placeholder="请输入手机号" class="form-control" aria-label="Large"
									aria-describedby="inputGroup-sizing-sm" />
									<button type="submit" class="btn btn-primary">搜索</button>
							</div>
						</div>
					</div>
				</form>
			</div>
			<br />
			<table class="table table-hover">
				<thead>
					<tr>
						<td>序号</td>
						<td>ID</td>
						<td>手机号</td>
						<td>验证码</td>
						<td>发送时间</td>
						<td>ip地址</td>
						<td>注册类型</td>
						<td>发送状态</td>
						<td>user_id</td>
						<td>操作</td>
					</tr>
				</thead>

				<tbody th:object="${smsPageBean}">
					<tr th:each="sms :*{list}">
						<td th:text="${smsStat.count}"></td>
						<td th:text="${sms.id}"></td>
						<td th:text="${sms.mobile}"></td>
						<td th:text="${sms.code}"></td>
						<td th:text="${sms.sendTime} "></td>
						<td th:text="${sms.ip}"></td>
						<td th:text="${sms.sendType} eq 1 ? '老师':(${sms.sendType} eq 2 ? '学生':'未知类型')"></td>
						<td th:text="${sms.smsStatus} eq 1 ? '成功':'失败'"></td>
						<td th:text="${sms.userId} eq null ? '':${sms.userId}"></td>
						<td>
							<a href="#"
							th:href="@{/deleteSMS(id=${sms.id},currentPage=${smsPageBean.currentPage},mobile=${sms.mobile})}">删除</a></td>
					</tr>
				</tbody>
			</table>
			<div th:include="page :: SMSPager" th:remove="tag"></div>
		</div>
	</div>
</body>
</html>
